<div class="subhead ">
  <div class="container mx-auto">
    <h5>~/applications/<span class="text-primary overflow-scroll-nowrap"><%= @application.name %></span></h5>
    <div class="log-settings">
      <ul>
        <li>
        </li>
      </ul>
    </div>
  </div>
</div>
<div class="content container mx-auto">
  <ul>
    <li>
      <strong>Application Id:</strong>
      <%= @application.uid %>
    </li>
    <li>
      <strong>Secret:</strong>
      <%= @application.secret %>
    </li>
    <li>
      <strong>Scopes:</strong>
      <%= @application.scopes %>
    </li>
    <li>
      <strong>Callback urls:</strong>
      <table>
        <tbody>
          <%= for redirect_uri <- String.split(@application.redirect_uri) do %>
            <tr>
              <td>
                <code><%= redirect_uri %></code>
              </td>
              <tr>
                <td>
                  <%= link "Authorize", to: Routes.oauth_authorization_path(@conn, :new, client_id: @application.uid, redirect_uri: redirect_uri, response_type: "code", scope: @application.scopes), target: "_blank" %>
                </td>
              </tr>
            <% end %>
          </tbody>
        </table>
      </li>
    </ul>
    <span><%= link "Edit", to: Routes.oauth_application_path(@conn, :edit, @application) %></span>
    <span><%= link "Back", to: Routes.oauth_application_path(@conn, :index) %></span>
  </div>
